<template>
  <div class="con">
    <h1>正在进行 {{ num }}个</h1>
    <ul>
      <li
        v-for="(item, index) in list"
        :key="index"
        v-show="item.status == false"
      >
        <input type="checkbox" v-model="item.status" />
        <p>{{ item.title }}</p>
        <span @click="remove(index)">x</span>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  props: ["list", "num"],
  methods: {
    remove(index) {
      this.$emit("remove", index);
    },
  },
};
</script>
<style lang="scss" scoped>
.con {
  width: 800px;
  margin: 0 auto;
  li {
    height: 50px;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
  }
}
</style>
